package com.ziyun.pop.modules.production.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ziyun.pop.modules.order.dto.OrderCraftQuoteDto;
import com.ziyun.pop.modules.order.vo.OrderCraftServerVo;
import com.ziyun.pop.modules.production.entity.ErpOrderProductionEntity;
import com.ziyun.pop.modules.production.vo.ErpOrderProductionListVo;
import com.ziyun.pop.modules.production.vo.OrderSupplierStatisticsVo;
import com.ziyun.pop.modules.production.vo.OrderSupplierVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * erp订单生产表
 * 
 * @author gaosheng
 * @date 2018-10-05 15:00
 */
public interface ErpOrderProductionDao extends BaseMapper<ErpOrderProductionEntity> {

    int updateByMap(@Param("map") Map<String, Object> map, @Param("productionId") Integer productionId);

    List<OrderCraftQuoteDto> selectAllotedCraftsList(Integer itemId);

    List<OrderCraftServerVo> selectAllotedServerCraftsList(Integer erpItemId);

    List<ErpOrderProductionListVo> queryProductionList(@Param("map") Map<String,Object> params);

    List<ErpOrderProductionListVo> queryTwbProductionList(@Param("map") Map<String,Object> params);

    int countsOrderSupplier(@Param("map") Map<String, Object> params);

    List<OrderSupplierVo> queryOrderSupplierList(@Param("beginPage") int beginPage, @Param("size") int size, @Param("map") Map<String, Object> map);

    int updateBatchByMap(@Param("map") Map<String, Object> map, @Param("productionIds") Integer[] productionIds);

    OrderSupplierStatisticsVo twbOrderSupplierStatistics(@Param("sellerId") Long sellerId);

    List<ErpOrderProductionEntity> selectProductionListByOrderNos(@Param("orderNoList") List<String> orderNoList);
}
